POV-Ray : Newsgroups : povray.general : Can anyone shorten this sig? : Re: Can anyone shorten this sig? Server Time
5 Aug 2024 22:17:15 EDT (-0400)
  Re: Can anyone shorten this sig?  
From: Warp
Date: 18 Jul 2002 13:23:46
Message: <3d36f9a2@news.povray.org>
Ron Parker <ron### [at] povrayorg> wrote:
> #local T=-2;#while(T<2)#local U=2;#while(U>-2)#macro M(X,Y,V,W)#while(V<9)#local
> Z=X;#local X=X*X-Y*Y+U;#local Y=2*Z*Y+T;#if(X*X+Y*Y>4)#local W=0;#end#local V=V+
> 1;#end#if(W)#macro L(S)box{0,.02 pigment{rgb 9}translate<T+S,U+1,6>}#end L(-2)L(
> 0)L(1)L(2)#end#end M(-U,-T,0,1)#local U=U-.03;#end#local T=T+.05;#end//Tom Melly

  Of course you could do it this way. Besides being shorter, it's quite
faster:

#macro L(S)box{0,.02pigment{rgb 9}translate<T+S,U+1,6>}#end#local M=function
{pattern{mandel 9}}#local T=-2;#while(T<2)#local U=2;#while(U>-2)#if(M(U,T,0
)=1)L(-2)L(0)L(1)L(2)#end#local U=U-.03;#end#local T=T+.05;#end//Tom Melly


-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.